
struct mpeg_encode {
	AVCodecContext* codec_context;
	AVFrame *picture;
	uint8_t* outbuf;
	FILE* f;
	FILE* f_index;
	char index_file[1024];
	int pos;
	int frame_count; 
};

struct mpeg_encode* hunter_encode_alloc(char* file_name, char* index_file);
int hunter_encode_init(struct mpeg_encode* p_mpeg);
void hunter_encode_put(struct mpeg_encode* p_mpeg, unsigned char* buf);
void hunter_encode_close(struct mpeg_encode* p_mpeg);
